#ifndef WF_DIMANGULAR_H
#define WF_DIMANGULAR_H

#include "wf_dimension.h"
#include "pf_dimangular.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw angular dimensions.
 *
 */
class GUI_EXPORT WF_DimAngular : public WF_Dimension {
	Q_OBJECT
private:
    enum Status {
        SetLine1,      /**< Choose 1st line. */
        SetLine2,      /**< Choose 2nd line. */
        SetPos,        /**< Choose position. */
		SetText        /**< Setting text label in consle. */
    };

public:
    WF_DimAngular(PF_Container& container,
                              PF_GraphicView& graphicView);
    ~WF_DimAngular() {}
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionDimAngular;
	}

	virtual void reset();
	
    virtual void trigger();
	
    virtual void mouseMoveEvent(QMouseEvent* e);
    virtual void mouseReleaseEvent(QMouseEvent* e);

	virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
        virtual QStringList getAvailableCommands();
	
    virtual void hideOptions();
    virtual void showOptions();

    virtual void updateMouseButtonHints();

private:
    /** 1st chosen line */
    PF_Line* line1;
    /** 2nd chosen line */
    PF_Line* line2;
	/** Center of arc */
	PF_Vector center;
    /** Data of new dimension */
    PF_DimAngularAttribute edata;
	/** Last status before entering text. */
	Status lastStatus;
};

#endif
